package com.xy.entity.order;

import com.alibaba.fastjson.annotation.JSONField;
import com.xy.common.jpa.AbstractTimestampEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * Created by Thinkpad on 2018/1/18.
 */

@Entity
@Data
@Table(name = "order_delivery")
public class OrderDelivery extends AbstractTimestampEntity {

//    private String orderUuid;//订单id
    @ApiModelProperty(value="省")
    private String province;
    @ApiModelProperty(value="市")
    private String city;
    @ApiModelProperty(value="区")
    private String area;
    @ApiModelProperty(value="详细地址")
    private String village;
    @ApiModelProperty(value="邮政编码")
    private String postcode;
    @ApiModelProperty(value="收件人")
    private String receiver;
    @ApiModelProperty(value="手机号码")
    private String phone;

    @JSONField(serialize = false)
    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "order_uuid")
    private OrderMain orderMain;

//    private String deliveryTime;//配送时间

}
